package com.woniu.woniuticket.service.impl;

import com.woniu.woniuticket.entity.Xiankan;
import com.woniu.woniuticket.dao.XiankanMapper;
import com.woniu.woniuticket.service.IXiankanService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author spirit
 * @since 2020-02-27
 */
@Service
public class XiankanServiceImpl extends ServiceImpl<XiankanMapper, Xiankan> implements IXiankanService {


    @Resource
    private XiankanMapper xiankanMapper;

    @Override
    public List<Xiankan> selectxk(Integer studentId) {

        List<Xiankan> xiankan=xiankanMapper.selectxk(studentId);
        System.out.println(xiankan);
        return xiankan;
    }

    @Override
    public List<Xiankan> selectxkmo(Integer movieId) {
        List<Xiankan> xiankanmo=xiankanMapper.selectxk(movieId);
        System.out.println(xiankanmo);
        return xiankanmo;
    }

    @Override
    public int insertxk(Integer movieId,Integer studentId,String movieName,String movieTrailerPath,Integer xkStatus) {

        int insert=xiankanMapper.insertxk(movieId,studentId,movieName,movieTrailerPath,xkStatus);
        System.out.println(insert);
        return insert;
    }

    @Override
    public int deletexk(Integer movieId) {

        int delete=xiankanMapper.deletexk(movieId);

        return delete;
    }

}
